
package com.wzy.scns.repositery;

        import com.wzy.scns.entity.Teacher;
        import org.springframework.data.jpa.repository.JpaRepository;
        import org.springframework.stereotype.Repository;

        import java.util.Optional;

@Repository
public interface TeacherRepository extends JpaRepository<Teacher,Integer> {
    Teacher findByNameAndPassword(String name, String password);
    Teacher findByCodeAndPassword(String code, String password);

    Teacher findByName(String name);
    Teacher findByCode(String code);
//    Teacher findBy(String code,Integer id);
    Teacher findByCodeAndIdIsNot(String code,Integer id);
    Teacher findByNameAndIdIsNot(String name,Integer id);
}
